#include <iostream>
#include <vector>
#include <string>
#include <sw/redis++/redis++.h>
using namespace std;

template <class T>
void PrintElenums(const T& container)
{
    for(const auto& e : container)
    {
        cout << e << endl;
    }
}

template <>
void PrintElenums<vector<sw::redis::OptionalString>>(const vector<sw::redis::OptionalString>& container) 
{
    for(const auto& e : container)
    {
        if(e)
            cout << e.value() << endl;
        else
            cout << "元素无效" << endl;
    }
}

template <>
void PrintElenums<vector<pair<string,string>>>(const vector<pair<string,string>>& container) 
{
    for(const auto& pair : container)
    {
        cout << pair.first << " : ";
        cout << pair.second << endl;
    }
}

template <>
void PrintElenums<vector<pair<string,double>>>(const vector<pair<string,double>>& container) 
{
    for(const auto& pair : container)
    {
        cout << pair.first << " : ";
        cout << pair.second << endl;
    }
}